package team.seekers.skill.service;

import org.springframework.transaction.annotation.Transactional;
import team.seekers.skill.entity.dao.SkillComment;
import com.baomidou.mybatisplus.extension.service.IService;
import team.seekers.skill.entity.query.CommentQuery;
import team.seekers.skill.entity.vo.fore.add.SkillCommentAddVO;
import team.seekers.skill.entity.vo.fore.update.SkillCommentUpdateVO;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hbc
 * @since 2021-01-18
 */
public interface SkillCommentService extends IService<SkillComment> {

    @Transactional(rollbackFor=Exception.class)
    boolean add(SkillCommentAddVO commentVO);

    @Transactional(rollbackFor=Exception.class)
    boolean delete(String commentId);

    @Transactional(rollbackFor=Exception.class)
    boolean update(SkillCommentUpdateVO commentVO);

    //根绝skillId直接全部删除
    @Transactional(rollbackFor=Exception.class)
    boolean removeBySkillId(String skillId);

    Map<String,Object> pageCommentCondition(long current, long limit, CommentQuery commentQuery);
}
